package com.xh.bussiness.teachbook.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;


/**
 * <p>
 *
 * </p>
 *
 * @author Pitt zhang
 * @since 2019/9/4
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bk_teaching_book_plan_detail")
public class TeachingBookPlanDetail extends Model<TeachingBookPlanDetail> {

    /**
     * 主键ID , 这里故意演示注解可以无
     */
    @TableId(value = "id",type = IdType.UUID)
    private String id;

    /**
     * 教学计划主表id
     */
    private String teachingBookPlanId;
    /**
     * 父节点
     */
    private String parentId;
    /**
     * 阶段名称
     */
    private String name;
    /**
     * 课时
     */
    private Integer classhour;

    /**
     * 序号
     */
    private Integer orderNo;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    /**
     * 备课id
     */
    private String teachingBookId;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
